package o;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import androidx.annotation.NonNull;
import o.cym.a;
import o.cym.c;
import o.cym.e;
import o.dky.j;

public class cze extends evq implements OnClickListener {
    private evn ˎ;
    private ImageView ˏ = ((ImageView) findViewById(a.ॱॱ));

    public cze(Context context) {
        super(context);
        LayoutInflater.from(context).inflate(e.ॱ, this, true);
        ˊ((LinearLayout) findViewById(a.ᐝ));
        this.ˏ.setOnClickListener(this);
    }

    private void ˊ(@NonNull LinearLayout linearLayout) {
        LayoutParams layoutParams = (LayoutParams) linearLayout.getLayoutParams();
        int dimensionPixelSize = getResources().getDimensionPixelSize(c.ˎ);
        int dimensionPixelSize2 = getResources().getDimensionPixelSize(c.ॱ) + azb.ᐝ(cyn.ॱ());
        int i = getResources().getConfiguration().orientation;
        int ˋ = cdo.ˋ(cyn.ॱ());
        if (i == 1) {
            layoutParams.topMargin = ˋ;
        } else {
            i = cdo.ॱ(cyn.ॱ()) - cdo.ˊ(cyn.ॱ());
            if (i == 0) {
                i = dimensionPixelSize;
            } else {
                dimensionPixelSize2 = i;
                i = ˋ;
            }
            layoutParams.setMarginStart(dimensionPixelSize2);
            layoutParams.topMargin = i;
        }
        linearLayout.setLayoutParams(layoutParams);
    }

    public void ˏ(evp o_evp) {
    }

    public evn ˎ() {
        return this.ˎ;
    }

    public void setVideoPlayer(evn o_evn) {
        this.ˎ = o_evn;
    }

    public void setImage(int i) {
    }

    public ImageView ॱ() {
        return null;
    }

    public void ˎ(int i) {
        cyq.ˋ.ˎ("SplashScreenVideoController", "onPlayStateChanged,playState: " + i);
        switch (i) {
            case -2:
            case 3:
                setKeepScreenOn(true);
                return;
            case 2:
                ˊॱ();
                return;
            default:
                return;
        }
    }

    public void ˋ(int i) {
    }

    public void ˊ() {
    }

    public void ˋ() {
        setKeepScreenOn(false);
    }

    public void ॱ(long j) {
    }

    public void ˋ(int i, int i2, String str, String str2) {
    }

    public int ˎ(String str) {
        return 0;
    }

    public void ˊ(String str, int i) {
    }

    public void ˏ() {
    }

    public void ᐝ() {
    }

    public void onClick(View view) {
        if (view == this.ˏ) {
            ʻ();
        }
    }

    private void ʻ() {
        if (ͺ()) {
            ˊ(false);
            evt.ˊ(this.ˎ.ॱ(), 2);
            return;
        }
        evt.ˊ(this.ˎ.ॱ(), 1);
        ˊ(true);
    }

    private void ˊ(boolean z) {
        if (z) {
            if (this.ˎ.ͺ()) {
                ॱॱ();
            }
        } else if (this.ˎ.ˏॱ()) {
            ʼ();
        }
    }

    private void ॱॱ() {
        this.ˏ.setImageResource(dky.a.ॱᐝ);
        this.ˏ.setContentDescription(getContext().getResources().getString(j.ˏˏ));
    }

    private void ʼ() {
        this.ˏ.setImageResource(dky.a.ᐝॱ);
        this.ˏ.setContentDescription(getContext().getResources().getString(j.ˑ));
    }

    private boolean ͺ() {
        int ˎ = evt.ˎ(this.ˎ.ॱ());
        if (ˎ == -1 || ˎ == 1) {
            return true;
        }
        return false;
    }

    private void ˊॱ() {
        ˊ(ͺ());
    }
}
